<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%@taglib prefix="pu" uri="/WEB-INF/tld/pageutil.tld" %>
<%@taglib prefix="mu" uri="/WEB-INF/tld/mallutil.tld" %>
<%@taglib uri="http://java.sun.com/jstl/core" prefix="c"%>
<%@taglib uri="http://java.sun.com/jstl/core_rt" prefix="c-rt"%>
<%@taglib uri="http://java.sun.com/jstl/fmt_rt" prefix="fmt-rt"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
<%@taglib uri="/WEB-INF/tld/importTag.tld" prefix="import" %>
<%@taglib uri="http://www.yaodian100.com/jsp/yaodian100" prefix="yaodian100" %>
<%@page import="com.yaodian100.core.common.utils.ServerValue"%>
<%@page import="com.yaodian100.ec.product.entity.Product"%>
<%@page import="java.util.regex.Matcher"%>
<%@page import="java.util.regex.Pattern"%>
<%@page import="java.math.BigDecimal"%>
<%@page import="com.yaodian100.mall.member.util.UserData"%>
<%@page import="com.yaodian100.core.common.utils.StringUtils"%>
<link rel="image_src" type="image/jpeg" href="${imgDomain}/PImg/${pu:substring(productId, 0,4) }/${productId}/${productId}_m250.jpg" />
<c-rt:set var="initialDate"><%=ServerValue.getInitialDate()%></c-rt:set>
<script src="/js/cart.js"></script>
<script src="/js/jquery.floatinglayer.min.js"></script>
<script type="text/javascript" charset="UTF-8" src="/js/jquery.cookie.js"></script>
<script src="/js/product.js?v=${initialDate}"></script>
<script src="/js/jquery.lazyload.yaodian100.js"></script>
<c-rt:set var="hostName" value='<%=ServerValue.getFrontHostname()%>'/>
<c-rt:set var="hostName2" value='<%=request.getServerName()%>'/>
<c-rt:set var="daphneLimitPrice" value='<%=ServerValue.getDaphneLimitPrice()%>'/>
<c-rt:set var="imgDomain"><%=ServerValue.getImgDomain()%></c-rt:set>
<c-rt:set var="frontendContextPath"><%=ServerValue.getFrontContextPath()%></c-rt:set>
<c-rt:set var="midProdHtmlPath"><%=ServerValue.getMidProdHtmlPath()%></c-rt:set>
<jsp:include page="/common/collection.jsp"/>
<c-rt:set var="frontContentHtmlPath" value='<%=ServerValue.getFrontContentHtmlPath()%>'/>
<c-rt:set var="bfdCode" value='<%=ServerValue.getBfdCode()%>'/>
<c-rt:set var="useBfd" value='<%=ServerValue.getUseBfd()%>'/>
<c-rt:set var="useCreditcard" value='<%=ServerValue.getUseCreditcard()%>'/>
<c-rt:set var="useCreditcardPeriod" value='<%=ServerValue.getUseCreditcardPeriod()%>'/>
${pu:reqSet('currentDate', pu:currentDate()) }
<c-rt:if test="${!empty param.productId}">
<c-rt:if test="${product.productType=='6'}">
${pu:reqSet('toBuyMethod', 'toBuy(\'addOnProductNm\')') }
${pu:reqSet('toAddCartMethod', 'toAddCart3()') }
</c-rt:if>
<c-rt:if test="${product.productType!='6'}">
${pu:reqSet('toBuyMethod', 'toBuy(\'addOnProductB\')') }
${pu:reqSet('toAddCartMethod', 'toAddCart2()') }
</c-rt:if>
<c-rt:if test="${resultDaphne['isDaphne'] and resultDaphne['invDaphne'] and product.isScm ne 'Y'}">
${pu:reqSet('toBuyDaphneMethod', 'toBuy(\'addOnProductB\',\'true\')') }
</c-rt:if>
<c-rt:if test="${resultDaphne['isDaphne'] and resultDaphne['invDaphne'] and product.isScm ne 'Y' and product.productType=='6'}">
${pu:reqSet('toBuyDaphneMethod', 'toBuy(\'addOnProductNm\',\'true\')') }
</c-rt:if>
</c-rt:if>
<c-rt:url value="/product/loadProdComment.do?productId=${productId}" var="commentUrl"/>
<script>
function toPage(commentTp,pageNum){
	doAR('${commentUrl}&AJAX=true&refreshZone=commentTag&commentTp=' + commentTp + '&pager.currentPage=' + pageNum ,'commentTag');
}
function loadProdComment(commentTp){
	doAR('${commentUrl}&AJAX=true&refreshZone=commentTag&commentTp=' + commentTp,'commentTag');
	$("#commentTag").ajaxStop(function(){
		initComment();
		$("#"+commentTp).addClass('up');
	});
}
function initComment(){
	$('.comment-filter > li').each(function(){
		$(this).removeClass();
	});
}
var hasTlProduct = "${hasTlProduct}";
var haveInventory=false;
var content;
var specs=new Array();
var maxPOQ=new Array();
var minPOQ=new Array();
var hotSaleInventory = new Array();
var inventory=new Array();
var specNames=new Array();
var soldInventory=new Array();
var productType='${product.productType}';
var categoryLevel="${category.level}";
var categoryId="${category.id}";
var categoryPath="${category.categoryPath}";
var productPickQty=${product.pickupQty!=null?product.pickupQty:0};
var loginUrl='<c-rt:url value="/tologin.do?redirect_url=/product/product.do?productId=${product.productId }"/>';
var imgUrl;
var fullUrl = '<%="http://"+request.getServerName()+ServerValue.getFrontContextPath()%>';
$(function(){
	$("#productRating").click(function(){
		$("#productcommentTab").click();
	});
	$('.comment-filter > li').each(function(){
	  	$(this).bind('mouseenter mouseleave', function(){
	      $(this).toggleClass('current');
	  	});
	 });
	$('img').lazyload({
		placeholder:"http://s.yaodian100.com/images/none2.gif"
		,failurelimit:300
	});	 
	$('img', $('.sub-menu')).each(function(){
		$(this).attr('src', $(this).attr('original'));
	});
	$('img', $('#recContent')).each(function(){
		$(this).attr('src', $(this).attr('original'));
	});
	$('img', $('#recContent_100')).each(function(){
		$(this).attr('src', $(this).attr('original'));
	});	
	$("div[id*='btn-pre']").click(function(){
		var thisid = $(this).attr("id");
		var tmp100 = "";
		if ( thisid.indexOf("_100") == -1 ){
			tmp100 = "";
		}else{
			tmp100 = "_100";
		}
		$('img', $('#recContent' + tmp100)).each(function(){
			$(this).attr('src', $(this).attr('original'));
		});
	});
	$("div[id*='btn-next']").click(function(){
		var thisid = $(this).attr("id");
		var tmp100 = "";
		if ( thisid.indexOf("_100") == -1 ){
			tmp100 = "";
		}else{
			tmp100 = "_100";
		}
		$('img', $('#recContent' + tmp100)).each(function(){
			$(this).attr('src', $(this).attr('original'));
		});
	});
		
	if ( $("#currPage").text() == 1 || $("#currPage_100").text() == 1){
		$(".a-togo").hide();
		$(".page-change > .a-togo").show();
	}
	$(".a-togo").click(function(){
		var thisid = $(this).attr("id");
		var tmp100 = "";
		if ( thisid.indexOf("_100") == -1 ){
			tmp100 = "";
			$("#page1").show();
			$("#page2").hide();
			$("#page3").hide();
		}else{
			tmp100 = "_100";
			$("#page_1001").show();
			$("#page_1002").hide();
			$("#page_1003").hide();
		}
		$("#currPage" + tmp100).text(1);
		$("#a-togo" + tmp100).hide();
	});
	
	$(".btn-left").click(function(){
		var thisid = $(this).attr("id");
		var tmp100 = "";
		if ( thisid.indexOf("_100") == -1 ){
			tmp100 = "";
		}else{
			tmp100 = "_100";
		}
		var currPage = parseInt($("#currPage" + tmp100).text(),10);
		var totalPage = parseInt($("#totalPage" + tmp100).text(),10);
		if ( (currPage - 1) < 1 ){
			$("#currPage" + tmp100).text(totalPage);
			$("#page"  + tmp100 + currPage).hide();
			$("#page"  + tmp100 + totalPage).show();
		}else{
			$("#currPage" + tmp100).text(currPage-1);
			$("#page" + tmp100 + currPage).hide();
			$("#page" + tmp100 + (currPage-1)).show();
		}
		if ( $("#currPage" + tmp100 ).text() == 1 ){
			$("#a-togo" + tmp100).hide();
		}else{
			$("#a-togo" + tmp100).show();
		}
	});
	$(".btn-right").click(function(){
		var thisid = $(this).attr("id");
		var tmp100 = "";
		if ( thisid.indexOf("_100") == -1 ){
			tmp100 = "";
		}else{
			tmp100 = "_100";
		}
		var currPage = parseInt($("#currPage" + tmp100).text(),10);
		var totalPage = parseInt($("#totalPage" + tmp100).text(),10);
		if ( (currPage + 1) > totalPage){
			$("#currPage" + tmp100).text(1);
			$("#page"  + tmp100 + currPage).hide();
			$("#page" + tmp100 + "1").show();
		}else{
			$("#currPage" + tmp100 ).text(currPage+1);
			$("#page"  + tmp100 + currPage).hide();
			$("#page"  + tmp100 + (currPage+1)).show();
		}
		if ( $("#currPage" + tmp100 ).text() == 1 ){
			$("#a-togo" + tmp100).hide();
		}else{
			$("#a-togo" + tmp100).show();
		}
	});	
	
	<c-rt:if test="${'on' eq useCreditcardPeriod and not empty creditcard and chkAvailableDetails}">
		$('img',$(".creditCard")).each(function(){
			$(this).attr('src', $(this).attr('original'));
		});
		$("#creditCardDialog").dialog({
			bgiframe: true,
			autoOpen: false,
			height: 500,
			width:600,
			modal: true
		});	
		$('#creditCardClose').click(function(){
			$("#creditCardDialog").dialog('close');
			return false;
		});
		$("#creditCardPeriod").click(function(){	
			$("#creditCardDialog").dialog('open');
		});	
	</c-rt:if>
	
	$('#productInfoTab').click(function(){
		$('img', $('#productInfo')).each(function(){
			$(this).attr('src', $(this).attr('original'));
		});
	});
	$('#productcommentTab').click(function(){
		$('img', $('#productcomment')).each(function(){
			$(this).attr('src', $(this).attr('original'));
		});
		loadProdComment('All');
	});
	$('#productqaaTab').click(function(){
		$('img', $('#productqaa')).each(function(){
			$(this).attr('src', $(this).attr('original'));
		});
	});
	$('#productMustReadTab').click(function(){
		$('img', $('#productMustRead')).each(function(){
			$(this).attr('src', $(this).attr('original'));
		});
	});
	
	//赠品数量不足时
	$("#chkPinvyDialog").dialog({
		bgiframe: true,
		autoOpen: false,
		height: 200,
		width:400,
		modal: true
	});		

	//主商品数量不足时
	$("#chkProdInvDialog").dialog({
		bgiframe: true,
		autoOpen: false,
		height: 200,
		width:400,
		modal: true
	});	

	//商品数量不足-刷新商品页
	$('#mainProdNotEnough').click(function(){
		location.href='<%=ServerValue.getFrontContextPath()%>/product/product.do?productId=${product.productId}';
		$("#chkProdInvDialog").dialog('close');
		return false;
	});	

	//赠品数量不足-关闭
	$('#presentNotEnough').click(function(){
		location.href='<%=ServerValue.getFrontContextPath()%>/product/product.do?productId=${product.productId}';
		$("#chkPinvyDialog").dialog('close');
		return false;
	});

	//赠品数量不足时-继续下一步(立即購買)
	$("#inv_Obnsubmit").click(function(){
		$("#chkPinvyDialog").dialog('close');
		$("#prtFlag").val("Y");
		$("#toBuyForm").submit();
		return false;
	});	
	
	//我要评价
	$('#addMyComment').click(function(){
		if ( !isLogin() ){
			window.location.replace("<%=ServerValue.getFrontContextPath()%>/tologin.do?redirect_url=http%3A%2F%2F<%=request.getServerName()%><%=ServerValue.getFrontContextPath()%>/product/product.do?productId=${product.productId}");
		}else{
			
			$.post("/ecmall/product/checkMyComment.do", {productId:'${product.productId}'},callback,'json');
		}
	});
					
	<c-rt:if test="${shelf.shelfPrice > daphneLimitPrice and resultDaphne['isDaphne'] and resultDaphne['invDaphne'] and product.isScm ne 'Y'}">
	$('.buy-daphne').show();
	<c-rt:if test="${product.productType!=1}">
	$('.daphne-msg').show();
	</c-rt:if>
	</c-rt:if>	
	
	$(document).keyup(function (e) { 
		if(e.which == 17) isCtrl=false; }
	).keydown(function (e) { 
		if(e.which == 17) isCtrl=true; 
		if(e.which == 67 && isCtrl == true) {
			$("#alertShareFail").hide(); 
			$("#alertShareSuccess").attr("style","display:block");
			$(".sharebylink").attr("style","display:block");
		} 
	});
	$(".sharebylink").hide();
	$("#alertShareSuccess").hide();
	$("#alertShareFail").hide();
	$(".shareto.L03").click(function(){
		var B=(function x(){})[-5]=='x'?'FF3' : (function x(){})[-6]=='x'?'FF2':/a/[-1]=='a'?'FF':'\v'=='v'?'IE':/a/.__proto__=='//'?'Saf':/s/.test(/a/.toString)?'Chr':/^function \(/.test([].sort)?'Op':'Unknown'
		if ( B != 'IE' ){
			$(".sharebylink").attr("style","display:block");
			$("#alertShareFail").attr("style","display:block");
		}else{
			document.getElementById("shareLink").createTextRange().execCommand("Copy");
			$("#alertShareSuccess").attr("style","display:block");
			$(".sharebylink").attr("style","display:block");
		}
		$('#shareLink').select();
	});
	
	$("#closeShare").click(function(){
		$(".sharebylink").hide();
	});
	<c-rt:choose>
		<c-rt:when test="${!empty param.z}">
			$("#main").attr("class","${zCategory.templateId}");
			<c-rt:set var="promoteId" value="${param.z}"/>
			<c-rt:set var="catePath" value="${fn:split(zCategory.categoryPath,'/')[0]}"/>
		</c-rt:when>
		<c-rt:otherwise>
			$("#main").attr("class","${category.templateId}");
			<c-rt:set var="promoteId" value="${category.id}"/>
			<c-rt:set var="catePath" value="${fn:split(category.categoryPath,'/')[0]}"/>
		</c-rt:otherwise>
	</c-rt:choose>
	<c-rt:if test="${catePath < 10}">
		<c-rt:set var="rcat">0${catePath}.recommend</c-rt:set>
	</c-rt:if>
	<c-rt:if test="${catePath >= 10}">
		<c-rt:set var="rcat">${catePath}.recommend</c-rt:set>
	</c-rt:if>
	<c-rt:set var="seoProp" value="<%=ServerValue.getSeoProp()%>"/>
	
	<c-rt:choose>
	<c-rt:when test="${empty param.key_pageable_currentPage && empty param.ask}">
	$('#j_tabs').tabs();
	</c-rt:when>
	<c-rt:otherwise>
	$('#j_tabs').tabs();
	$('#j_tabs').tabs('select', 1);
	$('.pdtab > li > a').each(function(i){
		$(this).removeClass('pdtab-f');
		if(i==1){
			$(this).addClass('pdtab-f');
		}
	});
	
	</c-rt:otherwise>
	</c-rt:choose>
	<c-rt:set var="haveInventory" value="false"/>
	var specIndex=0;
	<c-rt:set var="saledCount" value="0"/>
	<c-rt:forEach items="${product.specifications}" var="spec" varStatus="status">
		<c-rt:if test="${spec.isDelete!='Y'}">
			<c-rt:set var="parasSpecInventory" value="${null}"/>
			<c-rt:set var="paramsSpecInventory" value="${pu:addToList('parasSpecInventory', spec.specificationId)}"/>
			<c-rt:set var="specInventorys" value="${pu:queryByHql('from SpecificationInventory where specId=?', paramsSpecInventory, null)}"/>
			<c-rt:set scope="request" var="sis" value="${pu:addToList('siss', specInventorys[0])}"/>
			<c-rt:set var="saledCount" value="${saledCount + sis[status.index].soldInventory}"/>
				<c-rt:if test="${product.productType != 6}">
					$(document.body).data("${spec.specificationId}",specIndex);
					specs[specIndex]="${spec.specificationId}";
					specNames[specIndex]="${spec.specificationName}";
					maxPOQ[specIndex]=${spec.maxCountPerOrder};
					minPOQ[specIndex]=${spec.minCountPerOrder};
					hotSaleInventory[specIndex]=${spec.hotSaleInventory};
					inventory[specIndex]=${specInventorys[0].inventory!=null?specInventorys[0].inventory:0};
					soldInventory[specIndex]=${specInventorys[0].soldInventory!=null?specInventorys[0].soldInventory:0};
					specIndex++;
					<c-rt:if test="${specInventorys[0].inventory > 0 && specInventorys[0].inventory >= spec.minCountPerOrder && product.productType!='6'}">
						haveInventory=true;
						<c-rt:set var="haveInventory" value="true"/>
					</c-rt:if>
				</c-rt:if>
				<c-rt:if test="${product.productType == 6}">
					specs[specIndex]="${spec.specificationId}";
				</c-rt:if>
		</c-rt:if>
	</c-rt:forEach>
	<c-rt:set var="saledCount" value="${saledCount + hotSaleInventory}"/>
	init();
	initSpec();
	syncAddOnProduct();
	//if($("#spec")[0].length == 2){
		//alert($("#spec")[0].options[1].value);
	//	$("#spec")[0].options[1].setAttribute('selected',true);
	//	changeInventory($("#spec")[0].options[1].value);
	//}
	$(".pd-reminder").append();	
	chkAddOnProductUp();
	chkAddOnProductDown();
	<c-rt:if test="${product.isDelete=='Q'}">
		$('.arr-tellme').show();
	</c-rt:if>	
	$(".clear-history").click(function(){
		$.post("/ecmall/product/jsonClearPV.do",{},clearPVCallback,"json");
	});
	<c-rt:if test="${!haveInventory and product.productType eq '7'}">
		$('.buy-car-no').hide();
	</c-rt:if>
	
	//图片
	<c-rt:forEach items="${product.specMajors}" var="specMajor" varStatus="status">
	$(document.body).data('${specMajor.mainSpecId}',${specMajor.jsonDetail});

	<c-rt:choose>
    <c-rt:when test="${product.graphicType eq 'R'}">
    $(document.body).data('img_'+'${specMajor.mainSpecId}','${specMajor.imgRmain}');
    $(document.body).data('simg_'+'${specMajor.mainSpecId}','${specMajor.imgRmspec}');
    </c-rt:when>
    <c-rt:otherwise>
    $(document.body).data('img_'+'${specMajor.mainSpecId}','${specMajor.imgMain}');
    $(document.body).data('simg_'+'${specMajor.mainSpecId}','${specMajor.imgMspec}');
    </c-rt:otherwise></c-rt:choose>
    </c-rt:forEach>
  	//default image
	if($("#cover_id").length > 0){
		setImgUrl($(document.body).data('img_'+ $("#cover_id").val()));
	}else{
		setImgUrl($(document.body).data('img_${product.specMajors[0].mainSpecId}'));
	}
	
	//一般商品
	<c-rt:if test="${product.productType!='6'}">
	$(":a[id*=ms_]").each(function(){
		var msId = $(this).attr('id').split('_')[1];
		var secSpec = $(document.body).data(msId);
		var haseQty = false;
		$(secSpec).each(function(index, temp) {
			if(inventory[$(document.body).data(temp.specId)]>0){
				haseQty = true;
			}
		});
		if(!haseQty){
			$('<span class="pd-type-none" title="'+$(this).text()+'-售完">'+$(this).html()+'</span>').insertAfter($(this));
			$(this).remove();
		}
	});
	//default select
	if($("#cover_id").length > 0 && $("#ms_"+$("#cover_id").val()).length > 0){
		$("#ms_"+$("#cover_id").val()).click();
	}else if($(":a[onclick*=selectProdMainSpec]").length>0){
		$(":a[onclick*=selectProdMainSpec]").eq(0).click();
	}
	
	
	</c-rt:if>// end 一般商品
	
});
<c-rt:if test="${product.productType!='6'}">
<yaodian100:specSelectJs addOnProdTypeInvMap="${addOnProdTypeInvMap['addon']}" prodSpecMajorMap="${prodSpecMajorMap}" addOnProdTypes="${addOnProdTypeMap['addon']}"/>
</c-rt:if>
function clearPVCallback(clearPV){
	if ( clearPV == "true" ) $(".my-history > li").remove();
	$(".clear-history").hide();
	$(".my-history").append('<li class="no-recode">您没有任何记录</li>');
}
//双属性 图
function setImgUrl(imgUrls){
	imgUrl = imgUrls.split(',');
}
function changeImgMain(index){
	if(imgUrl.length > index){
		$(".pimage > img").eq(0).attr('src','${imgDomain}'+imgUrl[index]);
		$(".img-list > a").removeAttr('class');
		$(".img-list > a").eq(index).attr('class','list-fo');
	}
}
//双属性 一般商品
<c-rt:if test="${product.productType!='6'}">
function selectProdMainSpec(msId){
	if($("#ms_"+msId).attr('class')!='pd-type-fo'){
		changeInventory('');
		var secSpec = $(document.body).data(msId);
		var secSpecHtml = '';
		$(secSpec).each(function(index, temp) {
			if(inventory[$(document.body).data(temp.specId)]>0){
				secSpecHtml += '<a class="pd-type" href="javascript:;" id="ss_'+ temp.specId +'" onclick="selectProdSecondSpec(' + temp.specId + ');" title="'+temp.specName+'">'+temp.specName+'</a>';
			}else{
				secSpecHtml += '<span class="pd-type-none" title="'+temp.specName+'-售完">'+temp.specName+'-售完</span>';
			}
		});
		$("#secSpecArea").html(secSpecHtml);
		$(":a[id*=ms_].pd-type-fo").attr('class','pd-type');
		$("#ms_"+msId).attr('class','pd-type-fo');
		$("#msem1").html($("#ms_"+msId).attr('title'));
		$("#msem2").html('"<em>'+$("#ms_"+msId).attr('title')+'</em>"');
		$("#ssem1").html('');
		$("#ssem2").html('');
		if($(":a[id*=ss_]").length>0){
			$(":a[id*=ss_]").eq(0).click();
		}
		// change img
		$("div.img-list > a > img").hide();	
		setImgUrl($(document.body).data('img_'+ msId));
		var simg = $(document.body).data('simg_'+ msId).split(',');
		for(var i = 0 ; i < simg.length ; i++){
			$("div.img-list > a > img").eq(i).attr('src','${imgDomain}'+simg[i]);
			$("div.img-list > a > img").eq(i).show();
		}
		changeImgMain(0);
	}
}

function selectProdSecondSpec(ssId){
	if($("#ss_"+ssId).attr('class')!='pd-type-fo'){
		$(":a[id*=ss_]").attr('class','pd-type');
		$("#ss_"+ssId).attr('class','pd-type-fo');
		$(":em[id*=ssem]").html();
		$("#ssem1").html($("#ss_"+ssId).attr('title'));
		$("#ssem2").html(',"<em>'+$("#ss_"+ssId).attr('title')+'</em>"');
		$('#spec').val(ssId);
		changeInventory(ssId);
	}
}
//加购商品
function selectNm(index, mspecId, specId){
	$('#selectMs_'+index).attr('value', mspecId);
	$('#selectMs_'+index).change();
	$('#selectSs_'+index).attr('value', specId);
	$('#selectSs_'+index).change();
	$(":input[value*="+index+"_]").attr('checked', true);
}
function callback(actionResult){
	if(actionResult=='true'){
		location.href='<%=ServerValue.getFrontContextPath()%>/member/mycomment/mycomment.do?p=1';
	}else{
		var cannotcomment="<strong >您目前不能评价该商品，可能有以下原因：</strong><br /><ol class='list-num' style='padding:.5em 0 0 8.5em'><li>您已经评价过该商品。</li><li>购买该商品的时间已经超过半年。</li> <li>您可能还没有在耀点100购买过该商品。</li> </ol>";
		alertDialog('系统提示', cannotcomment,"",420,'auto');
	}
}
</c-rt:if>
</script>
 <!-- content start -->
    <div class="content">
      <div class="pd-mainbox">
        <div class="pd-photobox">
		  <!--  雙屬性左大圖 -->
		  <c-rt:set var="specMajor1" value="${product.specMajors[0]}"/>
		  <c-rt:forEach items="${product.specMajors}" var="specMajor" varStatus="status">
          	<c-rt:if test="${specMajor.isDelete eq 'N' && specMajor.isCover eq 'Y'}"><c-rt:set var="specMajor1" value="${specMajor}"/></c-rt:if>
          </c-rt:forEach>
		  <c-rt:choose>
		  	<c-rt:when test="${product.graphicType eq 'R'}">
		  		<c-rt:set var="graphicSize" value='width="400" height="530"'/>
		  		<c-rt:set var="sGraphicSize" value='width="75" height="99"'/>
		  		<c-rt:set var="img_main" value="${fn:split(specMajor1.imgRmain, ',')}"/>
		  		<c-rt:set var="img_mspec" value="${fn:split(specMajor1.imgRmspec, ',')}"/>
		  	</c-rt:when><c-rt:otherwise>
		  		<c-rt:set var="graphicSize" value='width="400" height="400"'/>
		  		<c-rt:set var="sGraphicSize" value='width="75" height="75"'/>
		  		<c-rt:set var="img_main" value="${fn:split(specMajor1.imgMain, ',')}"/>
		  		<c-rt:set var="img_mspec" value="${fn:split(specMajor1.imgMspec, ',')}"/>
		  	</c-rt:otherwise>
		  </c-rt:choose>
		  
          <div class="pimage">
          		<div class="img-list">
          			<c-rt:set var="img_class" value='class="list-fo"'/>
          			<c:forEach var="i" begin="0" end="4" varStatus="status">
          				<c-rt:choose>
		  				<c-rt:when test="${fn:length(img_mspec) > i}">
		  					<a href="javascript:;" ${img_class} onclick="changeImgMain(${i});"><img src="${imgDomain}${img_mspec[i]}" ${sGraphicSize} onError="this.src='/PImg/blank_<c-rt:choose><c-rt:when test="${product.graphicType eq 'R'}">r99</c-rt:when><c-rt:otherwise>75</c-rt:otherwise></c-rt:choose>.gif'"/></a>
		  				</c-rt:when><c-rt:otherwise>
		  					<a href="javascript:;" onclick="changeImgMain(${i});" style="display:none;"><img src="" ${sGraphicSize} /></a>
		  				</c-rt:otherwise>
		  				</c-rt:choose>
		  				<c-rt:set var="img_class" value=""/>
          			</c:forEach>
                </div>
       		    <img src="${imgDomain}${img_main[0]}" title="${product.productName}" ${graphicSize} onError="this.src='/PImg/blank_<c-rt:choose><c-rt:when test="${product.graphicType eq 'R'}">r530</c-rt:when><c-rt:otherwise>500</c-rt:otherwise></c-rt:choose>.gif'"/>
          </div>
          <!--  雙屬性左大圖 -->
		  
          <div class="infoarea">
            <p class="pimgbar">
            	<span class="icon-safe"><a href="/help/10_compensate.html" target="_blank">保证正品</a></span>
            	<a href="/help/8_policy.html" target="_blank" class="icon-change">
            	<c-rt:choose>
            		<c-rt:when test="${product.returnRule=='30_30'}">
            			<img src="/images/returnRule/30_30.gif" title="收货后，30天可退换货" alt="收货后，30天可退换货" />
            		</c-rt:when>
            		<c-rt:when test="${product.returnRule=='00_15'}">
            			<img src="/images/returnRule/00_15.gif" title="收货后，不可退/15天可换货" alt="收货后，不可退/15天可换货" />
            		</c-rt:when>
            		<c-rt:when test="${product.returnRule=='00_00'}">
            			<img src="/images/returnRule/00_00.gif" title="收货后，不可退/换货" alt="收货后，不可退/换货" />
            		</c-rt:when>
            		<c-rt:otherwise>
            			<img src="/images/returnRule/07_15.gif" title="收货后，7天可退/15天可换" alt="收货后，7天可退/15天可换" />
            		</c-rt:otherwise>
            	</c-rt:choose>
            	</a>
            	<c-rt:set var="shareLinkPath" value='${hostName}${frontendContextPath}/product/product.do?productId=${product.productId}'/>
            	<c-rt:if test="${not empty shelf.promoteName}"><c-rt:set var="promoteName" value="${shelf.promoteName} - "/></c-rt:if> 
     					<c-rt:set var="happyText" value='《${promoteName}${product.productName}》商品优质，价格便宜，赶快去看看！'/>分享到：
     					<a href="javascript:traceVirtualPage('/product.do?productId=${product.productId}&hpp=kaixinmck');window.open('http://www.kaixin001.com/repaste/share.php?rtitle='+encodeURIComponent('我在 耀点100 网站发现这件促销商品很不错，推荐给大家！')+'&rurl='+encodeURIComponent('${shareLinkPath}')+'&rcontent=' + encodeURIComponent('${fn:escapeXml(happyText)}') ,'_blank','scrollbars=no,width=600,height=450,left=75,top=20,status=no,resizable=yes'); void 0;" class="shareto L01" style="cursor: pointer;cursor:hand;" title="分享到开心网！" ><b></b></a>
     					<a href="javascript:traceVirtualPage('/product.do?productId=${product.productId}&hpp=renrenmck');void((function(s,d,e){var f='http://share.renren.com/share/buttonshare?link=',u='${shareLinkPath}&hpp=renren',l='',p=[e(u),'&title=',e(l)].join('');function a(){if(!window.open([f,p].join(''),'xnshare',['toolbar=0,status=0,resizable=1,width=626,height=436,left=',(s.width-626)/2,',top=',(s.height-436)/2].join('')))u.href=[f,p].join('');};if(/Firefox/.test(navigator.userAgent))setTimeout(a,0);else a();})(screen,document,encodeURIComponent));" class="shareto L02" style="cursor: pointer;cursor:hand;" title="分享到人人网！"><b></b></a>
     					<a href="javascript:traceVirtualPage('/product.do?productId=${product.productId}&hpp=qqmck');postToWb();" class="shareto L05" title="分享到腾讯！"><b></b></a>
     					<!-- 
     					<a href="http://v.t.sina.com.cn/share/share.php?appkey=732367816&title=我在 耀点100 网站发现这件促销商品很不错，推荐给大家！${shareLinkPath} ${fn:escapeXml(happyText)}" target="_blank" class="shareto L06" title="分享到新浪微博！"><b></b></a>
     					 -->
     					<!-- sina  分享   -->
     					<a href="javascript:traceVirtualPage('/product.do?productId=${product.productId}&hpp=sinamck');window.open('http://v.t.sina.com.cn/share/share.php?appkey=732367816&title='+encodeURIComponent('我在 耀点100 网站发现这件促销商品很不错，推荐给大家！${shareLinkPath}${fn:escapeXml(happyText)}') ,'_blank','scrollbars=no,width=600,height=450,left=75,top=20,status=no,resizable=yes'); void 0;" class="shareto L06" style="cursor: pointer;cursor:hand;" title="分享到新浪微博！" ><b></b></a>
     					<script type="text/javascript">function postToWb(){var _t = encodeURI('${fn:escapeXml(happyText)}');var _url = encodeURIComponent('${shareLinkPath}');var _appkey = encodeURI("67523a5364aa43bdb6e8d18f93ac5524");var _pic = encodeURI($('.pimage img').attr('src'));var _site = '${hostName}';var _u = 'http://v.t.qq.com/share/share.php?url='+_url+'&appkey='+_appkey+'&site='+_site+'&pic='+_pic+'&title='+_t;window.open( _u,'', 'width=700, height=680, top=0, left=0, toolbar=no, menubar=no, scrollbars=no, location=yes, resizable=no, status=no' );}</script>
     					<a href="javascript:traceVirtualPage('/product.do?productId=${product.productId}&hpp=copymck');" class="shareto L03" style="cursor: pointer;cursor:hand;" title="复制连结传给好友！" ><b></b></a>
     					<a class="shareto L04" href="<c-rt:url value="/sharing/sharing.do"/>?prodId=${product.productId}" target="_blank" title="分享给其他朋友！" ><b></b></a>
	            <div style="display:none;" class="sharebylink">
	            	<s id="closeShare" style="cursor: pointer;cursor:hand;">X</s><input name="shareLink" type="text" id="shareLink" value="${shareLinkPath}&hpp=share" readonly="readonly" onfocus="this.select();" onclick="this.select();"/>
	            	<span id="alertShareSuccess" style="display:none;">连结已复制！您可通过QQ, 旺旺, MSN将此网址传给您的好友了！</span>
	            	<span id="alertShareFail" class="msg rn" style="display:none;">你的浏览器不支持自动复制功能！<br/>您可以按Ctrl+C，将商品链接复制下来。</span>
	            </div>
	          </p>
            <c-rt:forEach items="${productCampaigns}" var="pc" varStatus="status">
            	<c-rt:set scope="request" var="campaignDetail">
            	${pu:replaceAll(pc.campaignDetail, '\'', '&#39;')}
            	</c-rt:set>
            	<c-rt:set scope="request" var="campaignDesc">
            	${pu:replaceAll(pc.campaignDesc, '\'', '&#39;')}
            	</c-rt:set>
            	<script>
								function openDialog_${status.index}(){
									<%
									String campaignDetail=(String)request.getAttribute("campaignDetail");
									String campaignDesc=(String)request.getAttribute("campaignDesc");
									campaignDetail=campaignDetail.replaceAll("\r\n", "").replaceAll("\r", "").replaceAll("\n", "");
									campaignDesc=campaignDesc.replaceAll("\r\n", "").replaceAll("\r", "").replaceAll("\n", "");
									request.setAttribute("campaignDetail", campaignDetail);
									request.setAttribute("campaignDesc", campaignDesc);
									%>
								openDialog('活动信息', compositeCampaign('${pu:replaceAll(pc.campaignName, '\'', '&#39;')}', '${campaignDetail}', '${campaignDesc}', '<fmt-rt:formatDate value="${pc.startDateTime}" pattern="yyyy/MM/dd HH:mm:ss"/>', '<fmt-rt:formatDate value="${pc.endDateTime}" pattern="yyyy/MM/dd HH:mm:ss"/>', '${pc.campaignUrl}'), 300, 'auto');
								$( "#dialog" ).dialog( "option", "position", 'top' );
								}
            	</script>
            	<p>
           		<c-rt:if test="${pc.type.desc eq '立减优惠'}"><c-rt:set var="promoClass" value="1"/></c-rt:if>
           		<c-rt:if test="${pc.type.desc eq '立折优惠'}"><c-rt:set var="promoClass" value="2"/></c-rt:if>
           		<c-rt:if test="${pc.type.desc eq '活动赠品'}"><c-rt:set var="promoClass" value="3"/></c-rt:if>
            	<a class="icon-promo-0${promoClass}" href="javascript:openDialog_${status.index }();">${pc.campaignName}</a>
							</p>
            	</c-rt:forEach>
          </div>
         </div>
         <div class="pd-infobox">
         	<span class="icon-collection"><a id="addWishList_${product.productId }_${product.listPrice }" href="javascript:;">加入收藏盒</a></span>
         	<span class="pd-number">商品编号：${product.productId }</span>
          <div class="infoboxheader">
            <input type="hidden" id="productId" value="${product.productId }"/>
            <input type="hidden" id="webpath" name="webpath" value="<%=application.getContextPath().substring(1, application.getContextPath().length()) %>"/>
            <input type="hidden" id="categoryPath" name="categoryPath" value="${product.mainCategoryID }"/>
            <input type="hidden" id="type" name="type" value="${product.productType }"/>
            	<p><strong>${shelf.promoteName}</strong></p>
            	<h1>${product.productName}</h1>
          </div>
          ${pu:reqSet('brief',mu:productBrief(param.productId))}
          <pre class="infocontent">${brief!=null?brief:'<br/><br/>'}</pre>
          <div class="infocontent-type">
          	<c-rt:if test="${hasTlProduct}">
          		<p><span class="type-7">秒杀</span>限时秒杀限会员购买</p>
          	</c-rt:if>
						<import:around enableCache="false" url="product/product/present" appendParameter="productId">
						<c-rt:if test="${not empty addOnProdTypeMap['present']}">
						<c-rt:forEach items="${addOnProdTypeMap['present']}" var="present" varStatus="presentIndex">
							<c-rt:forEach items="${prodSpecMap[present.addOnProductId]}" var="spec" varStatus="ssssaaaa">
									<c-rt:if test="${addOnProdTypeInvMap['present'][spec.specificationId] >0}">
										<p><span class="type-2">赠品</span>
										<script>
											var presentInventory_${ssssaaaa.count}="${addOnProdTypeInvMap['present'][spec.specificationId]}";
										</script>
										<c-rt:set var="presenturl">
					     				<%=ServerValue.getFrontContextPath()%>/product/presentProductInfo.do?productId=${present.addOnProductId }
					     			</c-rt:set>
										<input type="hidden" class="presents" name="presents" value="${present.addOnProductId }_${spec.specificationId}_1_${present.mainCategoryID}_2_<%=application.getContextPath() %>"/>
										<a href="javascript:;" onclick="openDialog('',$('#presentDiv').load('${presenturl}'),337,590);return false;">${present.addOnDesc}</a>
										</p>
								</c-rt:if>
							</c-rt:forEach>
						</c-rt:forEach>   
						</c-rt:if>   
						</import:around>
						${pu:reqSet('hqlCampaign', 'from Campaign c where ? in elements(c.rangeExtList) and c.enable = ? and c.delete = ? and c.startDateTime <= ? and c.endDateTime >= ? and c.type=?')}
           	${pu:listAdd('paramsCampaign', pu:toString(product.productId)) }
           	${pu:listAdd('paramsCampaign', pu:toBoolean('true')) }
           	${pu:listAdd('paramsCampaign', pu:toBoolean('false')) }
           	${pu:listAdd('paramsCampaign', currentDate) }
           	${pu:listAdd('paramsCampaign', currentDate) }
           	${pu:listAdd('paramsCampaign', 'S01')}
           	${pu:reqSet('campaigns', pu:queryByHql(hqlCampaign, pu:arrayGet('paramsCampaign'), null)) }
           	<c-rt:if test="${campaigns[0].typeExtends[0].campaignTypeExtension > 0}">
            <p><span class="type-money">&nbsp;</span>买就<span class="txt-rd">送积分 
            <b>${campaigns[0].campaignAmount }</b>
            </span></p>
             </c-rt:if> 
            <c-rt:choose>
              <c-rt:when test="${product.productType==1}">
                <p><span class="type-1">预购</span>预计<b><big><fmt-rt:formatDate value="${product.expectShipDate}" pattern="yyyy-MM-dd"/></big></b>开始出货</p>
              </c-rt:when>
              <c-rt:otherwise>
                <c-rt:if test="${product.isScm eq 'Y' && product.useDeliveryDay =='Y' && product.deliveryDay <= 5}">
                 <p><span class="type-8"></span><strong>此商品预计须<strong class="txt-rd">3~5日</strong>备货</strong></p>
                </c-rt:if>
                <c-rt:if test="${product.isScm eq 'Y' && product.useDeliveryDay =='Y' && product.deliveryDay > 5}">
                 <p><span class="type-8"></span><strong>此商品预计须<strong class="txt-rd">${product.deliveryDay+1}日</strong>备货</strong></p>
                </c-rt:if>
                <c-rt:if test="${product.isScm eq 'B'}">
                  <c-rt:if test="${product.useDeliveryDay =='Y' && product.deliveryDay <= 5}">
                    <p><span class="type-8"></span><strong>此商品预计须<strong class="txt-rd">3~5日</strong>备货</strong></p>
                  </c-rt:if>
                  <c-rt:if test="${product.useDeliveryDay =='Y' && product.deliveryDay > 5}">
                    <p><span class="type-8"></span><strong>此商品预计须<strong class="txt-rd">${product.deliveryDay+1}日</strong>备货</strong></p>
                  </c-rt:if>
                  <c-rt:if test="${product.useDeliveryDay !='Y' && supplierApply.boToWHDate<=5}">
                    <p><span class="type-8"></span><strong>此商品预计须<strong class="txt-rd">3~5日</strong>备货</strong></p>
                  </c-rt:if>
                  <c-rt:if test="${product.useDeliveryDay !='Y' && supplierApply.boToWHDate>5}">
                    <p><span class="type-8"></span><strong>此商品预计须<strong class="txt-rd">${supplierApply.boToWHDate+1}日</strong>备货</strong></p>
                  </c-rt:if>                  
                </c-rt:if>
              </c-rt:otherwise>
            </c-rt:choose>
            <c-rt:if test="${'on' eq useCreditcardPeriod or 'on' eq useCreditcard}">     
							<p><span class="type-8"></span>支持信用卡
							<c-rt:if test="${'on' eq useCreditcard}">
								<c-rt:forEach items="${billBankSingleCodeMenu.options}" var="bankCode">
									<c-rt:set var="bankNames">${bankNames}${bankCode.value.name}、</c-rt:set>
								</c-rt:forEach>
							<a title="本商品支持以下银行信用卡：${fn:substring(bankNames,0,fn:length(bankNames)-1)}" href="javascript:;">单期支付</a>
							</c-rt:if>
	            <c-rt:if test="${'on' eq useCreditcardPeriod and not empty creditcard and chkAvailableDetails}">
	            	 / <a title="信用卡分期支付详情" href="javascript:;" id="creditCardPeriod">分期支付</a><span class="txt-rd">(限立即购买)</span>
	            </c-rt:if>             
	            </p>
            </c-rt:if>   
            <c-rt:if test="${shelf.shelfPrice > daphneLimitPrice and resultDaphne['isDaphne'] and resultDaphne['invDaphne'] and product.isScm ne 'Y'}">
							<p class="daphne-info"><img src="/images/daphne/logo.gif" alt="达芙妮DAPHNE"  />：<strong>上海全区</strong>支援达芙妮门店取货，需单独结帐 <span>(<a href="/help/1_daphne.html" target="_blank">详情</a>)</span></p>
						</c-rt:if>
						<c-rt:if test="${(product.productType != 6 and product.canUseCod eq 'N') or product.isScm eq 'Y' }">
	          	<p>付款限定：<span class="txt-rd">不支持货到付款</span>(<a href="/help/6_deliveryway.html" target="_blank">详情</a>)</p>
	          </c-rt:if>
	          <c-rt:if test="${volumeOfProduct}">
	          	<p>运送限定：<span class="txt-rd">大材积</span><a href="/help/1_bigsize.html" target="_blank">(详情)</a></p>
	          </c-rt:if>
            <p>商品重量：
            <c-rt:if test="${product.productWeight>0}">
<%-- 		<fmt-rt:formatNumber value="<%=(((Product)request.getAttribute("product")).getProductWeight()).divide(BigDecimal.valueOf(1000.0))%>" type="number" pattern="#,#0.00#" />--%>
            <fmt-rt:formatNumber value="${(product.productWeight+0.001)/1000.0}" pattern="#,#0.00#" />
            </c-rt:if>
            <c-rt:if test="${product.productWeight<=0}">
            0
            </c-rt:if>
            kg (<a href="/help/6_deliveryfee.html" target="_blank">重量与运费说明</a>)</p>
            <c-rt:if test="${brand != null}"><p>品　　牌：<a href="${frontendContextPath}/search/searchBrand.do?brandId=${brand.brandId}">${brand.brandName} ${brand.brandEname}</a></p></c-rt:if>
          	<c-rt:if test="${productComment != null}">
          	<div class="pd-star">用户评分：<div class="s-box star-<fmt-rt:formatNumber value="${productComment.avgScore}" pattern="#0"/>-${star}"><span class="sr1"></span><span class="sr2"></span><span class="sr3"></span><span class="sr4"></span><span class="sr5"></span></div>&nbsp;<em>${productComment.avgScore}</em>分&nbsp;(<a href="#productRating" id="productRating">已有${productComment.totalRecord}人评价</a>)</div>
             </c-rt:if>
             <c-rt:if test="${productComment==null}">
            <div class="pd-star">用户评分：<div class="s-box star-0-0"><span class="sr1"></span><span class="sr2"></span><span class="sr3"></span><span class="sr4"></span><span class="sr5"></span></div>&nbsp;(还没有用户评分)</div>
          	</c-rt:if>
          </div>
          
          <div class="grey-price">市场价：<b><c-rt:if test="${!empty product.listPrice}">￥<fmt-rt:formatNumber value="${product.listPrice}"  pattern="####0.0"/></c-rt:if></b></div>
          <div class="infocontent-price">会员价：<b><c-rt:if test="${!empty shelf.shelfPrice}">￥<fmt-rt:formatNumber value="${shelf.shelfPrice}"  pattern="####0.0"/></c-rt:if></b></div>
          <c-rt:if test="${!haveInventory}"><c-rt:set var="noinv" value="txt-gy"/></c-rt:if>
          <c-rt:if test="${product.productType!='6'}">
          <!-- 雙屬性版 -->
          <input type="hidden" id="spec" name="spec" value=""/>
         <div class="select-area">
         	<p class="pdtype-main"><strong>${product.mainCodeLabel}：</strong><em id="msem1"></em><br />	
         		<c-rt:forEach items="${product.specMajors}" var="specMajor" varStatus="status">
         		<c-rt:if test="${specMajor.isDelete eq 'N'}">
          		<a class="pd-type" href="javascript:;" onclick="selectProdMainSpec('${specMajor.mainSpecId}');" id="ms_${specMajor.mainSpecId}" title="${specMajor.mainSpecName}"><img src="${specMajor.imgIcon}" onError="this.src='/PImg/40x40.gif'" width="40" height="40" />${specMajor.mainSpecName}</a>
          		<c-rt:if test="${specMajor.isCover eq 'Y'}"><input type="hidden" value="${specMajor.mainSpecId}" id="cover_id"></c-rt:if>
          		</c-rt:if>
          		</c-rt:forEach>
            </p>
            <p><strong>${product.secondCodeLabel}：</strong><em id="ssem1"></em><br />
            	<div id="secSpecArea"></div>
            </p>
            <p><strong>已选择：</strong><span id="msem2"><em>未选择</em></span><span id="ssem2"></span></p>
            <p><strong>我要买：</strong>
              <label>
                <select name="qty" id="qty" class="${noinv}" style="_width:3.5em;"></select>
              </label>件</p>
            <c-rt:if test="${saledCount > 10}">
            	<span class="saled">(热销 <strong class="txt-rd">${saledCount+product.hotSaleInventory}</strong> 件!)</span>
            </c-rt:if>
         </div>
         <!-- 雙屬性版 -->
         
          </c-rt:if>
          <c-rt:if test="${product.productType=='6'}">
          <input type="hidden" id="qty" name="qty" value="1"/>
          <input type="hidden" id="spec" name="spec" value=""/>
          </c-rt:if>
<%--不为n选m、daphne才显示 --%>
<c-rt:if test="${product.productType !='6'}">
<import:around enableCache="false" url="product/product/addOnProductS" appendParameter="productId">
	<c-rt:if test="${not empty addOnProdTypeMap['addon']}">
   <div class="buymorebox">
     <table border="0" class="tb-buymore">
     		<tbody>
     			<tr>
          	<th width="315"><img alt="选择加购商品" src="/images/pd/title_add.gif"></th>
           	<th><a href="javascript:;" onclick="moveBottom(0);">观看商品详情</a></th>
         	</tr>
       	</tbody>
      </table>
      <div style="${fn:length(addOnProdTypeMap['addon']) > 3 ?'height:310px; overflow-y:scroll; *padding-right:15px;' : ''}" class="buymorebox-body">
       	<table border="0" class="tb-buymore"><tbody>
        <c-rt:forEach items="${addOnProdTypeMap['addon']}" var="addOnProduct" varStatus="status">
          <c-rt:url value="/product/addOnProductInfo.do?productId=${addOnProduct.addOnProductId}&nmProductId=${product.productId}&index=${addOnProduct.addOnProductId}&addOnPrice=${addOnProduct.addOnPrice}" var="urlPath"/>
       	  <tr>
            <td class="${fn:length(addOnProdTypeMap['addon']) eq status.count ? 'lastone' : ''}" width="25" id="aop_${status.index}" align="center"><input class="addOnProduct" name="addOnProduct" type="checkbox" value="${addOnProduct.addOnProductId}_${prodSpecMap[addOnProduct.addOnProductId][0].specificationId}_1_${addOnProduct.mainCategoryID}_3_<%=application.getContextPath() %>"></td>
            <td class="${fn:length(addOnProdTypeMap['addon']) eq status.count ? 'lastone' : ''}" valign="middle">
             <a href="javascript:;" onClick="window.open('${urlPath}&mId='+$('#selectMs_${addOnProduct.addOnProductId}').val()+'&sId='+$('#selectSs_${addOnProduct.addOnProductId}').val(),'','width=950,height=620,directories=no,location=no,menubar=no,scrollbars=yes,status=no,toolbar=no,resizable=no,left=50,top=50');return false;" class="f-lt"><img src="${imgDomain}/PImg/${pu:substring(addOnProduct.addOnProductId, 0,4) }/${addOnProduct.addOnProductId}/${addOnProduct.addOnProductId}_rm93.jpg" onError="this.src='/PImg/blank_r93.gif'" alt="" width="70" height="93"/></a>
             <a href="javascript:;" onClick="window.open('${urlPath}&mId='+$('#selectMs_${addOnProduct.addOnProductId}').val()+'&sId='+$('#selectSs_${addOnProduct.addOnProductId}').val(),'','width=950,height=620,directories=no,location=no,menubar=no,scrollbars=yes,status=no,toolbar=no,resizable=no,left=50,top=50');return false;">${addOnProduct.addOnDesc}</a>
              <c-rt:if test="${empty addProdCommentMap}">
	             <div class="s-box star-0-0">
		       	  	用户评分：<span class="sr1"></span><span class="sr2"></span><span class="sr3"></span><span class="sr4"></span><span class="sr5"></span><br /><cite>(还没有用户评分)</cite>
		       	  </div> 
	       	 </c-rt:if>
	       	  <c-rt:if test="${not empty addProdCommentMap}">
		       	   <div class="s-box star-<fmt-rt:formatNumber value="${addProdCommentMap[addOnProduct.addOnProductId].avgScore}" pattern="#0"/>-${(addProdCommentMap[addOnProduct.addOnProductId].avgScore*10)%10>0?'5':'0'}"> 
					用户评分：<span class="sr1"></span><span class="sr2"></span><span class="sr3"></span><span class="sr4"></span><span class="sr5"></span><br /><cite>${addProdCommentMap[addOnProduct.addOnProductId].avgScore}分&nbsp;(<a href="#productRating" id="productRating">已有${addProdCommentMap[addOnProduct.addOnProductId].totalRecord}人评价</a>)</cite>
	               </div> 
	       	  </c-rt:if>
             <yaodian100:specSelect mainCodeLabel="${addOnProduct.mainCodeLabel}" secondCodeLabel="${addOnProduct.secondCodeLabel}" productId="${addOnProduct.addOnProductId}" productSpecMajors="${prodSpecMajorMap[addOnProduct.addOnProductId]}"/>
            </td>
            <td class="${fn:length(addOnProdTypeMap['addon']) eq status.count ? 'lastone' : ''}" width="90"><span class="txt-price">加购价<c-rt:if test="${!empty addOnProduct.addOnPrice}"><strong>￥<fmt-rt:formatNumber value="${addOnProduct.addOnPrice}"  pattern="####0.0"/></strong></c-rt:if></span></td>
          </tr>
        </c-rt:forEach>
        </tbody></table>
      </div>
      </div>
    </c-rt:if>
</import:around>
</c-rt:if>

          <div class="bt-box">
            	<c-rt:if test="${product.isDelete!='Q'}">
            		<c-rt:choose>
	            		<c-rt:when test="${product.productType eq '7'}">
	            			<a href="###" class="buy-main" onclick="${toBuyMethod}" title="立即购买" style="cursor: pointer;cursor:hand;display:none;">立即购买<b>&nbsp;</b></a>
	            		</c-rt:when>
	            		<c-rt:otherwise>
			            	<a href="###" class="buy-main" onclick="${toBuyMethod}" title="立即购买" style="cursor: pointer;cursor:hand;display:none;">立即购买<b>&nbsp;</b></a>
							   		<c-rt:if test="${(empty product.nmMustOrderBuy or product.nmMustOrderBuy eq 'N' ) and !hasAndeProduct}">
							   			<c-rt:if test="${!(product.productType=='1')}">
							    			<a href="###" class="buy-car" onclick="${toAddCartMethod}" title="加入购物车！" style="cursor: pointer;cursor:hand;display:none;">加入购物车<b>&nbsp;</b></a>
							    		</c-rt:if>
							    	</c-rt:if>
							   		<c-rt:if test="${product.nmMustOrderBuy eq 'Y' and product.productType ne '6' and !hasAndeProduct}">
							   			<a href="###" class="buy-car" onclick="${toAddCartMethod}" title="加入购物车！" style="cursor: pointer;cursor:hand;display:none;">加入购物车<b>&nbsp;</b></a>
							   		</c-rt:if>
				          </c-rt:otherwise>
            		</c-rt:choose> 
		            <c-rt:if test="${shelf.shelfPrice > daphneLimitPrice and resultDaphne['isDaphne'] and resultDaphne['invDaphne'] and product.isScm ne 'Y'}">
						<a class="buy-daphne" href="###" onclick="${toBuyDaphneMethod}" style="cursor: pointer;cursor:hand;display:none;" title="门店取货！">
   						门店取货<b>&nbsp;</b><br><div class="daphne-msg" style="display:none;"><span class="txt-rd">推广期免运费</span><br>暂不支持货到付款</div>
   						</a>
					</c-rt:if>	
   							<c-rt:if test="${product.productType!='1' or (resultDaphne['isDaphne'] and !resultDaphne['invDaphne']) }">
   								<div class="arr-tellme" style="display:none;"><p>
   									<c-rt:choose>
	   									<c-rt:when test="${product.showArrival}">
	   										预计<strong><fmt-rt:formatDate value="${product.arrivalDate}" pattern="yyyy-MM-dd"/></strong>到货
	   									</c-rt:when>
	   									<c-rt:otherwise>厂商火速补货中</c-rt:otherwise>
   									</c-rt:choose>
   								<br><a id="addRestockRemind_${product.productId }_${product.listPrice }" href="javascript:;">貨到通知我<b>&nbsp;</b></a></div>
   							</c-rt:if>
								<c-rt:if test="${product.productType=='1'}">
									<img class="buy-no" alt="已售完補貨中" src="/images/none.gif" style="display:none;">
								</c-rt:if>   							
	             <c-rt:if test="${product.productType=='1'}">
	             	<p>※ 此商品购买时会与其他商品分开结帐，并为您独立运送。</p>
	             </c-rt:if>
            	</c-rt:if>
            	<c-rt:if test="${product.isDelete=='Q'}">
            					<a title="即将开卖" class="coming-soon" href="javascript:;">即将开卖<b>&nbsp;</b></a>
            					<a title="即将开卖商品无法加入购物车，请使用「加入收藏盒」功能！" class="buy-car-no" href="javascript:;">加入购物车<b>&nbsp;</b></a>
		          </c-rt:if>
            </div>
        </div>
      </div>
      <c-rt:if test="${product.productType=='6'}">
      <import:wrap enableCache="false" url="/WEB-INF/jsp/product2/nm.jsp" appendParameter="productId"/>
      </c-rt:if>
      <c-rt:if test="${fn:endsWith(hostName2, 'yaodian100.com')}">
	      <script type="text/javascript" src="${imgDomain}/js/rec.js">
				{
				"mid":27,
				"iid":"${product.productId}",
				"ch":"${promoteId}",
				"rcat":"${seoProp[rcat]}",
				"layout":"js1",
				"count":"21", 
				<c-rt:if test="${not empty prodUserData.memberId}">
				"uid":"${prodUserData.memberId}",
				</c-rt:if>
				"success":function(s) {
				  eval("var p="+s);
				  var content ="";
				  var pc = 7;//每頁筆數
				  var np = 0;
				  var sp = 0;
				  var totalCount = p.length;
				  if(parseInt(totalCount) > 0){
				  	$("#alsozone_rec").show();
				  }
				  if ( parseInt(totalCount,10) <= pc ){
					  $("#btn-pre").attr("class","btn-left-no");
					  $("#btn-next").attr("class","btn-right-no");
				  }
				  $("#totalCount").text(totalCount);
				  var totalPage = Math.ceil(parseInt(totalCount,10)/7);
				  $("#totalPage").text(totalPage);
				  for(var pg = 1; pg <= totalPage; pg++ ){
					  if ( parseInt(totalPage,10) > 1 ){
						  if ( parseInt(pg,10) != 1 ){
							  content = content + '<div class="bg_box" id="page' + pg + '" style="display:none;">';
						  }else{
					  		content = content + '<div class="bg_box" id="page' + pg + '">';
						  }
					  }else{
						  content = content + '<div class="bg_box">';
					  }
					  sp = pc * pg - pc;
					  if ( parseInt((sp + pc),10) > parseInt(totalCount,10) ){
						  np = sp + (totalCount % pc);
					  }else{
						  np = sp + pc;
					  }
					  for(var i= sp;i < np;i++) {
						  var item = p[i];
					    var title = item.title; 
					    var url = item.clickurl;
					    var itemid = item.itemid;
					    var price = item.price.toFixed(1);
					    content = content + '<div class="alsopd">';
					    content = content + '<a href="' + url + '" target="_blank">';
					    content = content + '<img id="recImg_' + i + '" width="100" height="100" title="' + title + '" src="${imgDomain}/PImg/' + itemid.substring(0,4) + '/' + itemid + '/' + itemid + '_m100.jpg" onError="this.src=\'${imgDomain}/PImg/blank_100.gif\'" ></a>';
					    content = content + '<div class="alsoprice"><strong>￥' + price + '</strong></div>';
					    content = content + '</div>';
					  }
					  content = content + '</div>';
				  }
				  jQuery("#recContent").html(content);
				}}
				</script>
				<div class ="alsozone_title">
	      <c-rt:if test="${'on' eq useBfd}">
		      <script type="text/javascript"> 
		      	var bfdCode = "${bfdCode}";
		      	<c-rt:choose> 
						<c-rt:when test="${not empty prodUserData.memberId}">
							var rec_user_id = "${prodUserData.memberId}";
						</c-rt:when>
						<c-rt:otherwise>
							var rec_user_id = "${prodUserData.sessionId}";
						</c-rt:otherwise>
						</c-rt:choose>
						var rec_prod_id = "${product.productId}";
						var rec_session_id = "${prodUserData.sessionId}";
						var rec_prod_name = "${product.productName}";
						var rec_prod_link = "http://www.yaodian100.com/ecmall/product/product.do?productId=${product.productId}";
						var rec_prod_img_url = "http://s.yaodian100.com/PImg/${fn:substring(product.productId,0,4)}/${product.productId}/${product.productId}_m75.jpg";
						var rec_category_st = "${fn:replace(product.mainCategoryPath,'/','|')}";
						var rec_prod_price = "${product.viewShelf.shelfPrice}";
					</script>
		      <script type="text/javascript" src="/js/sku.js"></script>
		      <script type="text/javascript">
		    		function prodRecommendCallback(prodRecommendList){
							if ( null != prodRecommendList ){      		
			    		  var content ="";
			    		  var pc = 7;//每頁筆數
			    		  var np = 0;
			    		  var sp = 0;
			    		  var totalCount = prodRecommendList.length;
			    		  if ( parseInt(totalCount,10) <= pc ){
			    			  $("#btn-pre_100").attr("class","btn-left-no");
			    			  $("#btn-next_100").attr("class","btn-right-no");
			    		  }
			    		  $("#totalCount_100").text(totalCount);
			    		  var totalPage = Math.ceil(parseInt(totalCount,10)/7);
			    		  $("#totalPage_100").text(totalPage);
			    		  for(var pg = 1; pg <= totalPage; pg++ ){
			    			  if ( parseInt(totalPage,10) > 1 ){
			    				  if ( parseInt(pg,10) != 1 ){
			    					  content = content + '<div class="bg_box" id="page_100' + pg + '" style="display:none;">';
			    				  }else{
			    			  		content = content + '<div class="bg_box" id="page_100' + pg + '">';
			    				  }
			    			  }else{
			    				  content = content + '<div class="bg_box">';
			    			  }
			    			  sp = pc * pg - pc;
			    			  if ( parseInt((sp + pc),10) > parseInt(totalCount,10) ){
			    				  np = sp + (totalCount % pc);
			    			  }else{
			    				  np = sp + pc;
			    			  }
			    			  for(var i= sp;i < np;i++) {
			    					var item = prodRecommendList[i];
			    			    var title = item.productName; 
			    			    var url = "${hostName}${frontendContextPath}/product/product.do?productId=" + item.productId;
			    			    var itemid = item.productId;
			    			    var price = null == item.viewShelf ? "" : item.viewShelf.shelfPrice.toFixed(1);
			    			    content = content + '<div class="alsopd">';
			    			    content = content + '<a href="' + url + '&req_id=' + rec_req_id + '" target="_blank">';
			    			    content = content + '<img id="bfdImg_' + i + '" width="100" height="100" title="' + title + '" src="${imgDomain}/PImg/' + itemid.substring(0,4) + '/' + itemid + '/' + itemid + '_m100.jpg" onError="this.src=\'${imgDomain}/PImg/blank_100.gif\'" ></a>';
			    			    content = content + '<div class="alsoprice"><strong>￥' + price + '</strong></div>';
			    			    content = content + '</div>';
			    			  }
			    			  content = content + '</div>';
			    		  }
			    		  if ( "" != content ){
			    			  $("#alsozone_100").show();
			    		  	jQuery("#recContent_100").html(content);
			    		  }else{
			    			  $(".alsozone").hide();
			    		  }
		    			}
		    		}
		      </script>
		      <div id="alsozone_100" class="alsozone cmd-baifendian" style="display:none;">
						<div class="alsopager">
		          <p align="right">共<span id="totalCount_100"></span>笔：<span id="currPage_100">1</span>/<span id="totalPage_100"></span> <a id="a-togo_100" class="a-togo" href="###" style="display:none;">&lt;回第1页&gt;</a></p>
		        </div>
						<a title="上一页" id="btn-pre_100" class="btn-left" href="###">&nbsp;</a>
						<div id="recContent_100"></div>
			   		<a title="下一页" id="btn-next_100" class="btn-right" href="###">&nbsp;</a>
		      </div>
		    </c-rt:if>
	<div class="alsozone" id="alsozone_rec" style="display:none;">
	<div class="alsopager">
	<p align="right">共<span id="totalCount"></span>笔：<span id="currPage">1</span>/<span id="totalPage"></span> 
	<a id="a-togo" class="a-togo" href="###" style="display: none;">&lt;回第1页&gt;</a></p>
	</div>
	<a title="上一页" id="btn-pre" class="btn-left" href="###">&nbsp;</a>
	<div id="recContent"></div>
	<a title="下一页" id="btn-next" class="btn-right" href="###">&nbsp;</a></div>
	</div>
</c-rt:if>
    <div class="pd-sidebar">
			<import:static path="${frontContentHtmlPath}${pu:split(category.categoryPath, '/')[1]}/CATEGORY_PRODUCT_RANK.html"/>
      <ul class="my-history">
      	<c-rt:choose>
	      	<c-rt:when test="${empty mpvList}">
	      		<li class="no-recode">您没有任何记录</li>
	      	</c-rt:when>
	      	<c-rt:otherwise>
	      	<a href="###" class="clear-history">清除</a>
		        <c-rt:forEach items="${mpvList}" var="mpv" varStatus="index">
		        	<li class="${index.count eq fn:length(mpvList) ? 'lastone' :'' }">
		        		<a class="a-img" href="${frontendContextPath}/product/product.do?productId=${mpv.productId}&hpp=history" target="_blank">
		        			<img width="50" height="50" alt="" src="${imgDomain}/PImg/${pu:substring(mpv.productId, 0,4) }/${mpv.productId }/${mpv.productId}_m50.jpg" onError="this.src='/PImg/blank_50.gif'">
		        		</a>
		        		<a class="pdname" href="${frontendContextPath}/product/product.do?productId=${mpv.productId}&hpp=history" target="_blank">${mpv.productName}</a>
		        		<strong>￥ <fmt-rt:formatNumber value="${mpv.shelfPrice}"  pattern="####0.0"/></strong>
		        	</li>
		        </c-rt:forEach>
	      	</c-rt:otherwise>
      	</c-rt:choose>
     	</ul>
    </div>      
      ${pu:reqSet('tp', pu:pageableTag('key', 5, 10))}
      ${pu:listAdd('paramsQaa', 'CommonQuestion') }
      ${pu:listAdd('paramsQaa', 'productId') }
      ${pu:listAdd('paramsQaa', product.productId) }
      ${pu:listAdd('paramsQaa', pu:toBoolean('true')) }
      ${pu:listAdd('paramsQaa', pu:toBoolean('true')) }
	  ${pu:reqSet('hql', 'from QuestionExtraValue qev where qev.question.type.name=? and qev.name=? and qev.value=? and qev.question.answer!=null and qev.question.answer.showOnProductPage=? and qev.question.answer.isApproved=? order by qev.question.createDate desc')}
	  ${pu:reqSet('qeas', pu:queryByHql(hql, pu:arrayGet('paramsQaa'), tp)) }
	  <div class="pd-right">
      <div id="j_tabs">      
        <ul class="pdtab">
          <li><a id="productInfoTab" class="pdtab-f" href="#productInfo">商品信息</a></li>
          <li><a id="productcommentTab" href="#productcomment" name="productcomment">购买评价(<b class="txt-bl">${empty productComment?'0':productComment.totalRecord}</b>)</a></li>
          <li><a id="productqaaTab" href="#productqaa">商品问答(<b class="txt-bl">${tp.totalRecords }</b>)</a></li>
          <li><a id="productMustReadTab" href="#productMustRead">购物须知</a></li>
        </ul>        
       <div id="productInfo">
       		<import:wrap enableCache="false" url="/WEB-INF/jsp/product2/productInfo.jsp?productId=${product.productId}" appendParameter="productId"/>
       </div>
       	<a name="productRating"></a>
        <div id="productcomment">
        	<div class="pd-box" id="commentTag">
       		
       		</div>
       </div>
       <div id="productqaa">
       		<import:wrap enableCache="false" url="/WEB-INF/jsp/product2/productqaa.jsp?productId=${product.productId}" appendParameter="productId"/>
       </div>
       <div id="productMustRead">
       		${pu:reqSet('mustRead', mu:shoopingMustRead(product.productId)) }
       		<c-rt:if test="${!empty mustRead}">
       			${mustRead }
       		</c-rt:if>
       		<c-rt:if test="${empty mustRead}">
       			<import:static path="${midProdHtmlPath}${pu:split(category.categoryPath, '/')[0]}.txt"/>
       		</c-rt:if>
	<c-rt:choose>
		<c-rt:when test="${fn:startsWith(category.categoryPath,'4717')==true}">
			<import:static path="${midProdHtmlPath}reminder_4717.html"/>
		</c-rt:when>
		
		<c-rt:otherwise>
			<import:static path="${midProdHtmlPath}reminder.html"/>
		</c-rt:otherwise>
	</c-rt:choose>
       </div>
       <div>
       </div>
      </div>
			<%--不为n选m、daphne才显示 --%>
			<c-rt:if test="${product.productType !='6'}">
			<import:around enableCache="false" url="product/product/addOnProductB" appendParameter="productId">
			 <!-- 加購商品點擊後看到的layer --> 
						<div id="presentDiv"></div>
			       <!-- 加購商品點擊後看到的layer -->
			      <c-rt:if test="${not empty addOnProdTypeMap['addon']}">
			      <a name="pluspurchase"></a>
			      <div class="pluspurchase"> 
			        <div id="purchaseBox" class="pd-nm">
          			<ul>
          			<c-rt:forEach items="${addOnProdTypeMap['addon']}" var="addOnProduct" varStatus="aopStatus">
          				<c-rt:url value="/product/addOnProductInfo.do?productId=${addOnProduct.addOnProductId}&nmProductId=${product.productId}&index=${addOnProduct.addOnProductId}&addOnPrice=${addOnProduct.addOnPrice}" var="urlPath"/>
          				<li><a href="javascript:;" onClick="window.open('${urlPath}&mId='+$('#selectMs_${addOnProduct.addOnProductId}').val()+'&sId='+$('#selectSs_${addOnProduct.addOnProductId}').val(),'','width=950,height=620,directories=no,location=no,menubar=no,scrollbars=yes,status=no,toolbar=no,resizable=no,left=50,top=50');return false;"><img src="${imgDomain}/PImg/${pu:substring(addOnProduct.addOnProductId, 0,4) }/${addOnProduct.addOnProductId }/${addOnProduct.addOnProductId}_rm225.jpg" onError="this.src='/PImg/blank_r225.gif'" alt="" width="170" height="225" /></a>
              			<h6><a href="javascript:;" onClick="window.open('${urlPath}','','width=950,height=620,directories=no,location=no,menubar=no,scrollbars=yes,status=no,toolbar=no,resizable=no,left=50,top=50');return false;" class="pd-name">${addOnProduct.addOnDesc}</a></h6>
              		<div>加购价:<b>￥<fmt-rt:formatNumber value="${addOnProduct.addOnPrice}"  pattern="####0.0"/></b></div>
             		<yaodian100:specSelect mainCodeLabel="${addOnProduct.mainCodeLabel}" secondCodeLabel="${addOnProduct.secondCodeLabel}" productId="${addOnProduct.addOnProductId}" productSpecMajors="${prodSpecMajorMap[addOnProduct.addOnProductId]}"/>
              		<span>
                	<input id="aopb_${aopStatus.index}" class="addOnProductB" name="addOnProductB" type="checkbox" value="${addOnProduct.addOnProductId}_${prodSpecMap[addOnProduct.addOnProductId][0].specificationId}_1_${addOnProduct.mainCategoryID}_3_<%=application.getContextPath() %>">
                	我要加购</span>
                	</li>
                	</c-rt:forEach>              	
			        </ul>
			        </div>  
			      </div>
			      </c-rt:if>
			</import:around>
			</c-rt:if>
			<div class="ft-btn">
				<c-rt:if test="${product.isDelete!='Q'}">
					<c-rt:choose>
			   		<c-rt:when test="${product.productType eq '7'}">
			   			<a href="###" class="buy-main" onclick="${toBuyMethod}" title="立即购买" style="cursor: pointer;cursor:hand;display:none;">立即购买<b>&nbsp;</b></a>
			   		</c-rt:when>
			   		<c-rt:otherwise>
					   <a href="###" class="buy-main" onclick="${toBuyMethod}" title="立即购买" style="cursor: pointer;cursor:hand;display:none;">立即购买<b>&nbsp;</b></a>
				   		<c-rt:if test="${(empty product.nmMustOrderBuy or product.nmMustOrderBuy eq 'N') and !hasAndeProduct}">
				   			<c-rt:if test="${!(product.productType=='1')}">
				    			<a href="###" class="buy-car" onclick="${toAddCartMethod}" title="加入购物车！" style="cursor: pointer;cursor:hand;display:none;">加入购物车<b>&nbsp;</b></a>
				    		</c-rt:if>
				    	</c-rt:if>
				   		<c-rt:if test="${product.nmMustOrderBuy eq 'Y' and product.productType ne '6' and !hasAndeProduct}">
				   			<a href="###" class="buy-car" onclick="${toAddCartMethod}" title="加入购物车！" style="cursor: pointer;cursor:hand;display:none;">加入购物车<b>&nbsp;</b></a>
				   		</c-rt:if>
					  </c-rt:otherwise>
					</c-rt:choose>
					<c-rt:if test="${shelf.shelfPrice > daphneLimitPrice and resultDaphne['isDaphne'] and resultDaphne['invDaphne'] and product.isScm ne 'Y'}">
						<a class="buy-daphne" href="###" onclick="${toBuyDaphneMethod}" style="cursor: pointer;cursor:hand;display:none;" title="门店取货！">门店取货<b>&nbsp;</b></a>
					</c-rt:if>     
					<c-rt:if test="${!(product.productType=='1' or product.isScm=='Y') or (resultDaphne['isDaphne'] and !resultDaphne['invDaphne']) }">
						<div class="arr-tellme" style="display:none;"><p>
							<c-rt:choose>
								<c-rt:when test="${product.showArrival}">
									预计<strong><fmt-rt:formatDate value="${product.arrivalDate}" pattern="yyyy-MM-dd"/></strong>到货
								</c-rt:when>
								<c-rt:otherwise>厂商火速补货中</c-rt:otherwise>
							</c-rt:choose>
						<br><a id="addRestockRemind_${product.productId }_${product.listPrice }" href="javascript:;">貨到通知我<b>&nbsp;</b></a></div>
					</c-rt:if>
					<c-rt:if test="${product.productType=='1'}">
						<a class="buy-no" title="已售完補貨中" style="display:none;" href="javascript:;">已售完補貨中<b>&nbsp;</b></a>
					</c-rt:if>
			    <c-rt:if test="${product.productType=='1' or product.isScm=='Y'}">
			    	<p>※ 此商品购买时会与其他商品分开结帐，并为您独立运送。</p>
			    </c-rt:if> 
			  </c-rt:if>
			 	<c-rt:if test="${product.isDelete=='Q'}">
			 		<a title="即将开卖" class="coming-soon" href="javascript:;">即将开卖<b>&nbsp;</b></a>
            		<a title="即将开卖商品无法加入购物车，请使用「加入收藏盒」功能！" class="buy-car-no" href="javascript:;">加入购物车<b>&nbsp;</b></a>
			 	</c-rt:if>
			</div>
		</div>
    <!-- content end -->
    <form name="toBuyForm" id="toBuyForm" action="/ecmall/shopping/orderBuyNow.do" method="post">
    	<input type="hidden" name="itemNo"/>
    	<input type="hidden" name="specNo"/>
    	<input type="hidden" name="categoryPath"/>
    	<input type="hidden" name="type"/>
    	<input type="hidden" name="presents"/>
    	<input type="hidden" name="addOns"/>
    	<input type="hidden" name="qty"/>
    	<input type="hidden" name="webpath"/>
    	<input type="hidden" id="prtFlag" name="prtFlag"/>
    </form>
    <div id="dialog"></div>
<style>
.ui-widget-header{
	border:0px;
	padding:0px;
}
#j_tabs.ui-tabs .ui-tabs-panel{
	padding:0px;
}
#j_tabs.ui-widget {
	border:0px;
}
#j_tabs.ui-tabs .ui-tabs-nav li{
	margin:0px;
	margin-right:5px;
}

#j_tabs.ui-state-active, #j_tabs.ui-widget-content .ui-state-active {
	border:0px;
	padding-bottom:0px;
}
#j_tabs.ui-state-hover{
	padding-bottom:0px;
}
#j_tabs.ui-state-default, #j_tabs.ui-widget-content .ui-state-default {
	border:0px;
}
</style>
<div id="chkProdInvDialog" title="商品库存不足" class="alert-caution" style="display: none;">
	<p id="resultDiv"></p>
	<div align="center">
		<span style="text-align: center;">
			<a href="javascript:;" id="mainProdNotEnough" class="btn-mid">刷新商品页</a>
		</span>
	</div>
</div>
<div id="chkPinvyDialog" title="赠品库存不足" class="alert-caution" style="display: none;">
	<p id="resultDiv"></p>
	<div align="center">
		<span style="text-align: center;">
			<a href="javascript:;" id="presentNotEnough" class="btn-mid">关闭</a>
			<a href="javascript:;" id="inv_Obnsubmit" class="btn-mid" onfocus="blur()">继续下一步</a>
		</span>
	</div>
</div>
<c-rt:if test="${'on' eq useCreditcardPeriod and not empty creditcard and chkAvailableDetails}">
<div id="creditCardDialog">
	<div class="creditCard">
	  <p class="txt-L">本商品支持下列银行信用卡分期付款<span class="txt-rd">(限立即购买)</span>：</p>
	  <table width="100%" cellspacing="0" cellpadding="0" border="0" class="tb-p01">
	    <tbody>
		    <tr>
		      <th>银行</th>
		      <c-rt:forEach items="${creditcard.periodUnion}" var="period">
		      	<th>${period}期</th>
		      </c-rt:forEach>
		    </tr>
		    <c-rt:forEach items="${creditcard.cardDetails}" var="cardDetail">
		    	<c-rt:choose>
			    	<c-rt:when test="${cardDetail.setting.creditcardName eq '快钱'}">
			    		<c-rt:forEach items="${billBankCodeMenu.options}" var="bankCode">
						    <tr>
						      <td>
						      	<img width="100" height="30" class="bank-logo" alt="${bankCode.value.name}" src="/images/bank/bank_${bankCode.key}.gif">
						      </td>
						      <c-rt:forEach items="${creditcard.periodUnion}" var="period">
						      	<c-rt:choose>
							      	<c-rt:when test="${not empty cardDetail.periodMap[period]}">
							      		<td class="txt-money">
							      			<c-rt:choose>
								      			<c-rt:when test="${product.viewShelf.shelfPrice le cardDetail.upLimitMap[period] and product.viewShelf.shelfPrice ge cardDetail.downLimitMap[period]}">
								      				<span>￥<fmt-rt:formatNumber value="${((product.viewShelf.shelfPrice*(1+cardDetail.feeMap[period]/100))/period)+0.5}" pattern="#,###,##0" maxFractionDigits="0"/></span>元X${period}期
								      			</c-rt:when>
								      			<c-rt:otherwise>
								      				<span>-</span>
								      			</c-rt:otherwise>
							      			</c-rt:choose>
							      		</td>
							      	</c-rt:when>
							      	<c-rt:otherwise>
							      		<td class="txt-money"><span>-</span></td>
							      	</c-rt:otherwise>
						      	</c-rt:choose>
						      </c-rt:forEach>
						    </tr>
					    </c-rt:forEach>
				    </c-rt:when>
				    <c-rt:otherwise>
					    <tr>
					      <td>
					      	<img width="100" height="30" class="bank-logo" alt="${cardDetail.setting.creditcardName}" src="/images/bank/${cardDetail.id}.gif">
					      </td>
								<c-rt:forEach items="${creditcard.periodUnion}" var="period">
					      	<c-rt:choose>
						      	<c-rt:when test="${not empty cardDetail.periodMap[period]}">
						      		<td class="txt-money">
						      			<c-rt:choose>
							      			<c-rt:when test="${product.viewShelf.shelfPrice le cardDetail.upLimitMap[period] and product.viewShelf.shelfPrice ge cardDetail.downLimitMap[period]}">
							      				<span>￥<fmt-rt:formatNumber value="${((product.viewShelf.shelfPrice*(1+cardDetail.feeMap[period]/100))/period)+0.5}" pattern="#,###,##0" maxFractionDigits="0"/></span>元X${period}期
							      			</c-rt:when>
							      			<c-rt:otherwise>
							      				<span>-</span>
							      			</c-rt:otherwise>
						      			</c-rt:choose>
						      		</td>
						      	</c-rt:when>
						      	<c-rt:otherwise>
						      		<td class="txt-money"><span>-</span></td>
						      	</c-rt:otherwise>
					      	</c-rt:choose>
					      </c-rt:forEach>
					    </tr>
					  </c-rt:otherwise>
					</c-rt:choose>
			   </c-rt:forEach>
	    </tbody>
	  </table>
		<p>※ 此价格为初步核算，如有误差，以结账页最终结算为准。</p>
	  <div align="center"><a href="javascript:;" id="creditCardClose" class="btn-mid">关闭</a></div>
	</div>
</div>
</c-rt:if>